<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<h3>상영 중 영화 Best</h3>
<hr align="left" width="150">
<center>
	<table class="list">
		<tr>
			<td colspan="3" align="left" valign="middle"><h4>Best&nbsp;<select><option>평점순</option><option>예매순</option></select></h4></td>
		</tr>
		<tr align="center">
			<td><img src="" width="150" height="200"></td>
			<td><img src="" width="150" height="200"></td>
			<td><img src="" width="150" height="200"></td>
		</tr>
		<tr align="center">
			<td>영화1</td>
			<td>영화2</td>
			<td>영화3</td>
		</tr>
	</table>
</center>
<br><br>
<h3>상영 중 영화 All</h3>
<hr align="left" width="150">
<center>
<table class="list">
	<tr align="center">
		<c:forEach var="showingVO" items="${requestScope.sListVo.showingList}" varStatus="status">
		<c:if test="${status.index%4==0 }">
	</tr>
	<tr>
		</c:if>
			<td align="center">
				<table class="list">
					<tr>
						<td align="center">
							<a href="${initParam.root }movie/movie_content.do?flag=0&movieNo=${showingVO.movieNo}">
							<img src="${initParam.root }${showingVO.posterPath }" width="150" height="200"></a>
						</td>
					</tr>
					<tr>
						<td align="center">${showingVO.title }</td>				
					</tr>
				</table>
			</td>
		</c:forEach>
	</tr>
	<tr align="center">
		<td colspan="4">
		<c:if test="${requestScope.sListVo.pagingBean.previousPageGroup}">
			 <a href="${initParam.root }movie/showingList.do?pageNo=${requestScope.sListVo.pagingBean.startPageOfPageGroup-1}">◀&nbsp;</a>
		 </c:if>
		 &nbsp;&nbsp;
		<c:forEach var="i" begin="${requestScope.sListVo.pagingBean.startPageOfPageGroup}" end="${requestScope.sListVo.pagingBean.endPageOfPageGroup}">
		 	<c:choose>
		 		<c:when test="${requestScope.sListVo.pagingBean.nowPage!=i}">
		 			<a href="${initParam.root }movie/showingList.do?pageNo=${i}">${i}</a>
		 		</c:when>
			 	<c:otherwise>
					${i}
				</c:otherwise>
			</c:choose>
		</c:forEach>	 
		&nbsp;&nbsp;
		<c:if test="${requestScope.dlistvo.pagingBean.nextPageGroup}">
			<a href="${initParam.root }movie/showingList.do?pageNo=${requestScope.sListVo.pagingBean.endPageOfPageGroup+1}"> ▶ </a>
		</c:if>	
		</td>
	</tr>
</table>
</center>